package demo2;

public class Student implements Cloneable {
    public String name;
    public Money money = new Money();

    @Override
    protected Object clone() throws CloneNotSupportedException {
        //return super.clone();
        Student student1 = (Student) super.clone();
        student1.money = (Money) this.money.clone();
        return student1;
    }
}
